/*
TO DO:

*/

#include <iostream>
#include "Menu.h"

using namespace std;

int main()
{
    try
    {
        Menu m;
        m.RunMenu();
    }
    catch(Menu::Exception ex)
    {
        if (ex == Menu::MISSING_FILE)
        {
            cout << "Can not open a file! Exiting...";
            return 1;
        }
        else if (ex == Menu::BAD_INPUT)
        {
            cout << "Error in a file! Exiting...";
            return 2;
        }
        else if (ex == Menu::AUTH_FAILURE)
        {
            cout << "Login error! Exiting...";
            return 3;
        }
        else if (ex == Menu::BAD_AUTHFILE)
        {
            cout << "Wrong login file! You can not login this way. Exiting...";
            return 4;
        }
        else
        {
            cout << "Unknow error! Exiting...";
        }
        return 5;
    }
    return 0;
}
